<extend name="layout/main" />

<block name="HEADER">

</block>

<block name="CONTENT">
    <div class="wrapper" style="background: #FFFFFF;">
        <div class="panel-heading">
        	<control:search id="searchs" />
        </div>
        <div class="content" >
            <control:grid  id="grid" padding="0"  height="100%"  />
        </div>
    </div>
</block>

<block name="FOOTER">
    <script type="text/javascript">
    	var page=(function(ns){
    
            //页面初始化
            ns.init=function(){
                grid.load(searchs.getData());
                searchs.query(function(filter){
                    grid.load(filter);
                });
            }
            
            // 删除选中行
            ns.del=function(){
                grid.deleteSelectRow(); 
            }
            
            //清空
            ns.empty = function(){
                $.confirm("确定清空？",function(index){
                    $.ajaxs("/admin/soft/Log/emptyAll").then(function(){
                        grid.load();
                    });
                    layer.close(index);
                });
            }
            
            return ns;
        }({}));
        
        $(function(){ page.init(); });
    </script>
</block>



